import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);

export default new Router({
    routes: [
        {
            path: '/',
            redirect: '/login'
        },
        {
            path: '/competition-management ',
            component: resolve => require(['../components/common/Home.vue'], resolve),
            children:[  {
                path: '/',
                component: resolve => require(['../components/page/Competition-management.vue'], resolve),
            },
                {
                    path: '/add-match-information',
                    component: resolve => require(['../components/page/Add-match-information.vue'], resolve),
                },
                {
                    path: '/basic-competition-management',
                    component: resolve => require(['../components/page/Basic-competition-management.vue'], resolve),
                },
                {
                    path: '/competition-information-management',
                    component: resolve => require(['../components/page/Competition-information-management.vue'], resolve),
                },

                {
                    path: '/user-registration-management',
                    component: resolve => require(['../components/page/User-registration-management.vue'], resolve),
                },

                {
                    path: '/user-award-management',
                    component: resolve => require(['../components/page/User-award-management.vue'], resolve),
                },

                {
                    path: '/add-news',
                    component: resolve => require(['../components/page/Add-news.vue'], resolve),
                },

                {
                    path: '/news-list',
                    component: resolve => require(['../components/page/News-list.vue'], resolve),
                },
                //
                {
                    path: '/competition-management',
                    component: resolve => require(['../components/page/Competition-management.vue'], resolve)
                },
                {
                    path: '/user-management',
                    component: resolve => require(['../components/page/User-management.vue'], resolve)
                },
                {
                    path: '/news-management',
                    component: resolve => require(['../components/page/News-management.vue'], resolve)
                },
            ]
       },
        {
            path: '/login',
            component: resolve => require(['../components/page/Login.vue'], resolve),
        },
        {
            path: '/land',
            name:"Land",
            component: resolve => require(['../components/page/Land.vue'], resolve),
        },
        {
            path: '/registe',
            name:"Registe",
            component: resolve => require(['../components/page/Registe.vue'], resolve),
        },
        {
            path: '/forget-password',
            name:"Forget-password",
            component: resolve => require(['../components/page/Forget-password.vue'], resolve),
        },
        {
            path: '/about-us',
            name:"About-us",
            component: resolve => require(['../components/page/About-us.vue'], resolve),
        },
        {
            path: '/home-page',
            name:"Home-page",
            component: resolve => require(['../components/page/Home-page.vue'], resolve),
        },
        {
            path: '/competition-dynamics',
            name:"Competition-dynamics",
            component: resolve => require(['../components/page/Competition-dynamics.vue'], resolve),
        },
        {
            path: '/competition-details',
            name:"Competition-details",
            component: resolve => require(['../components/page/Competition-details.vue'], resolve),
        },
        {
            path: '/enroll',
            name:"Enroll",
            component: resolve => require(['../components/page/Enroll.vue'], resolve),
        },
        {
            path: '/mycompetition',
            name: 'MyCompetition',
            component: resolve => require(['../components/page/Mycompetition.vue'], resolve),
        },
        {
            path: '/mygame',
            name:"Mygame",
            component: resolve => require(['../components/page/Mygame.vue'], resolve),
        },
        {
            path: '/personal-achievement',
            name:"Personal-achievement",
            component: resolve => require(['../components/page/Personal-achievement.vue'], resolve),
        },

        {
            path: '/account-security',
            name:"Account-security",
            component: resolve => require(['../components/page/Account-security.vue'], resolve),
        },
        {
            path: '/success-competition',
            name:"Success-competition",
            component: resolve => require(['../components/page/Success-competition.vue'], resolve),
        },
        {
            path: '/personalInfo',
            name:"PersonalInfo",
            component: resolve => require(['../components/page/PersonalInfo.vue'], resolve),
        },
        {
            path: '/gateway',
            name:"Gateway",
            component: resolve => require(['../components/page/Gateway.vue'], resolve),
        },


    ]
})
